package com.ebid.templates.twenty;

import com.ebid.templates.utils.ParameterUtils;

import java.text.MessageFormat;

public class TendererExInfo {

    public static String tendererExInfo = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"+
            "<tendererExInfo> \n" +
            "    <legalCode>{0}</legalCode>\n" +
            "    <qualLevel>{1}</qualLevel>\n" +
            "    <qualName>{2}</qualName>\n" +
            "    <qualType>{3}</qualType>\n" +
            "    <qualCertN0>{4}</qualCertN0>\n" +
            "    <qualCertEndDate>{5}</qualCertEndDate>\n" +
            "    <customDefintionDataltem>{6}</customDefintionDataltem>\n" +
            "    <platFormCode>{7}</platFormCode>\n" +
            "    <pubServicePlatCode>{8}</pubServicePlatCode>\n" +
            "    <dataTimeStamp>{9}</dataTimeStamp>\n" +
            "</tendererExInfo>";

    public static void setTendererExInfo(String tendererExInfo,String s0,String s1,String s2,String s3,String s4,String s5,String s6,String s7,String s8,String s9) {
        TendererExInfo.tendererExInfo = MessageFormat.format(tendererExInfo,s0,s1,s2,s3,s4,s5,s6,s7,s8,s9);
    }

    public static void setTendererExInfo(){
        setTendererExInfo(tendererExInfo, ParameterUtils.get("legalCode"),
                                            ParameterUtils.get("qualLevel"),
                                            ParameterUtils.get("qualName"),
                                            ParameterUtils.get("qualType"),
                                            ParameterUtils.get("qualCertN0"),
                                            ParameterUtils.get("qualCertEndDate"),
                                            ParameterUtils.get("customDefintionDataltem"),
                                            ParameterUtils.get("platFormCode"),
                                            ParameterUtils.get("pubServicePlatCode"),
                                            ParameterUtils.get("dataTimeStamp")
                );
    }

    public static void main(String[] args) {
        setTendererExInfo();

        System.out.println(tendererExInfo);
    }
}
